|
|
Mark Wagner wrote:
>
> Josh Seagoe wrote in message <3BB### [at] smileyfacecom>...
> >Ok, more specific about what I posted about SuperTorus...
> >
> >This:
> >#declare K=function(v,p) { (v^p)^(1/p) }
> >
> >#debug concat(str(K(1,3), 2, 4), "\n")
> >#debug concat(str(K(.1,3), 2, 4), "\n")
> >#debug concat(str(K(-1,3), 2, 4), "\n")
> >#debug concat(str(K(-.1,3), 2, 4), "\n")
>
> Computers can't do exact representations of many fractions, so instead of
> trying to guess whether 0.33333333 is supposed to represent 1/3 or not, most
> computers simply reject the notion of raising negative numbers to
> non-integer powers.
>
> Try using the Windows calculator program to evaluate these. It's not a
> shortcoming in POV-Ray, it's a shortcoming of almost every computer in the
> world.
My very cheap little Casio fx-82 can do these correctly:
1 +/- ^ 3 = ^ 3 1/x =
Result: -1
0.1 +/- ^ 3 = ^ 3 1/x =
Result: -0.1
Tor Olav
Post a reply to this message
|
|